package com.kitchen.ui.dialog
{
	import com.kitchen.model.Vo.AccountVo;
	import com.kitchen.ui.box9grid.BetweenBox;
	import com.kitchen.ui.box9grid.InnerBox;
	import com.kitchen.ui.box9grid.OuterBox;
	
	import flash.display.BitmapData;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;

	public class UpgradeDialog extends AbstractDialog
	{
		public function UpgradeDialog(main:BitmapData, dialog:BitmapData, account:AccountVo)
		{
			super(main, dialog, account);
		}
		
		override public function getData():Object{
			var data:Object = new Object();
			return data;
		}
		
		override protected function layout(cdata:Object):void{
			this.w = 390;
			this.h = 290;
			var outer:OuterBox = new OuterBox(this.dialogSkin, this.w, this.h-20);
			var between:BetweenBox = new BetweenBox(this.dialogSkin, 370, 185);
			var inner:InnerBox = new InnerBox(this.dialogSkin, 350, 125);
			outer.x = 0;
			outer.y = 20;
			between.x = 10;
			between.y = 95;
			inner.x = 20;
			inner.y = 115;
			this.addChild(outer);
			this.addChild(between);
			this.addChild(inner);
			var head:DialogHeader = new DialogHeader(this.mainSkin, this.dialogSkin, 'myachieve');
			head.x = (this.w-head.w)/2;
			head.y = 0;
			this.addChild(head);
			var tf:TextField = new TextField();
			if(cdata.message == null){
				tf.text = 'message没有定义';
			}else{
				tf.text = cdata.message;
			}
			tf.selectable = false;
			tf.width = 290;
			tf.height = 60;
			tf.wordWrap = true;
			tf.x = 50;
			tf.y = 145;
			var tff:TextFormat = new TextFormat('黑体', 13, 0x4a3520, true);
			tff.align = TextFormatAlign.LEFT;
			tff.leading = 6;
			tf.setTextFormat(tff);
			this.addChild(tf);
			this.addSureButton();
		}
	}
}